package com.hongyun.tms.common.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hongyun.tms.common.annotation.Dept;
import com.hongyun.tms.common.annotation.Dict;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 员工 响应
 *
 * @author liPeng
 * @date 2024-05-31
 **/
@Data
@Builder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
public class MStaffVO implements Serializable {

    @ApiModelProperty(value = "主键ID")
    private Long id;


    @ApiModelProperty(value = "所参与的拖轮")
    private Long tugId;

    @Deprecated
    private String tugName;


    @ApiModelProperty(value = "员工编号")
    private String staffNo;

    @ApiModelProperty(value = "员工姓名")
    private String staffName;

    @ApiModelProperty(value = "性别，字典（0女1男）")
    @Dict(code = "SEX")
    private String sex;

    @ApiModelProperty(value = "生日")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate birthDay;

    @ApiModelProperty(value = "所属部门ID")
    @Dept
    private Long deptId;

    @ApiModelProperty(value = "入职日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate entryDate;

    @ApiModelProperty(value = "岗位代码")
    @Dict(code = "CREW_POST", fieldName = "postName")
    private String postCode;

    @ApiModelProperty(value = "0在职1离职")
    private Integer status;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "劳务公司代码")
    @Dict(code = "COMPANY_STAFF", fieldName = "companyName")
    private String companyCode;

    @ApiModelProperty(value = "是否船员，0否1是")
    private String isCrew;

    @ApiModelProperty(value = "是否驾驶员，0否1是")
    private String isDriver;

    @ApiModelProperty(value = "是否引水员，0否1是")
    private String isPilot;

    @ApiModelProperty(value = "船员系数")
    private BigDecimal crewRate;

    @ApiModelProperty(value = "离职月数")
    private Integer departMonth;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
}

